﻿Class RebootTc
    Inherits seTelnet

    Sub New(ByVal ip As String)
        MyBase.New(ip)
    End Sub
    Public Overrides Function runStep(ByVal loginStep As Integer, ByVal sectionStr As String) As RunStepMsg

        Select Case loginStep
            Case 0
                If (sectionStr.EndsWith("login: ")) Then
                    MyBase.SocketSend("admin" & vbCrLf)

                    Return RunStepMsg.nextStep
                End If
            Case 1
                If (sectionStr.EndsWith("Password: ")) Then
                    MyBase.SocketSend("admin" & vbCrLf)

                    Return RunStepMsg.nextStep
                End If
            Case 2
                If (sectionStr.EndsWith("\> ")) Then
                    MyBase.SocketSend("reboot" & vbCrLf)

                    Return RunStepMsg.RunEnd
                End If
            Case Else

        End Select
        Return RunStepMsg.wait

    End Function

End Class


